# 改写马拉松脚本，产生更清晰输出

def total_seconds(min, sec):
    return 60*min + sec


def speed(sec):
    return 3600 / sec


pace_minute = int(input('input pace minute'))
pace_second = int(input('input pace second'))
miles = int(input('input miles'))

mph = speed(total_seconds(pace_minute, pace_second))
print('your speed is ' + str(mph) + ' mph')

total = miles * total_seconds(pace_minute, pace_second)
elapsed_minutes = total // 60
elapsed_seconds = total % 60

print('your total elapsed time is ' + str(elapsed_minutes) +' minutes,' + str(elapsed_seconds) + ' seconds')
